import React, { useState } from 'react'
import Son from './components/Son';

export default function App() {
    let [count,setCount] = useState(99);
    const addCount = (num=1)=>{
        setCount(count + num);
    }
    return (
        <div>
            <h3>App</h3>
            <p>app state count: {count}</p>
            <p><button onClick={()=>addCount()}>count++</button></p>
            <hr/>
            <Son count={count} school='atguigu' addCount={addCount}/>
        </div>
    )
}
